using System;
using System.Data.Linq;

namespace RomanJendrusz.Amazon.ETL.Domain
{
    public class BrowseNodesBook
    {
        private EntityRef<Book> book;
        private EntityRef<BrowseNode> node;
        private int nodeId;
        private string bookAsin;
        private DateTime updated;

        public BrowseNodesBook()
        {
            this.book = new EntityRef<Book>();
            this.node = new EntityRef<BrowseNode>();
        }

        internal BrowseNodesBook(BrowseNode node, Book book)
        {
            bookAsin = book.Asin;
            this.book = new EntityRef<Book> { Entity = book };
            nodeId = node.BrowseNodeId;
            this.node = new EntityRef<BrowseNode> { Entity = node };

        }

        internal Book Book
        {
            get { return book.Entity; }
        }

        internal BrowseNode Node
        {
            get { return node.Entity; }
        }

        internal DateTime Updated
        {
            get { return updated; }
        }
    }
}